#pragma once
#include"INet.h"

class UdpNet:public INet
{
public:
	UdpNet(INetMediator* pMediator);
	~UdpNet();
 bool InitNet();
	//关闭网络
 void UnInitNet();
	//发送数据
 bool SendData(long ISendIp,char* buf,int nLen);//IP地址,BUf(具体发生数据的内容),长度

protected:
	//接收数据
	void RecvData();
	static unsigned int __stdcall RecvThread( void * lpvoid );
	SOCKET m_sock;
	HANDLE m_hThreadHandle;
	bool  m_isStop;
};
